<template>
  <div>
    <div class="list">
      <div class="item" v-for="(item, index) of categoryList" :key="index">
        <div class="listout">
          <span class="iconfont">&#xe6d5;</span>
          {{item.title}}
        </div>
        <div v-if="item.children" class="children">
          <detail-list :categoryList="item.children"></detail-list>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: 'detailList',
  props: {
    categoryList: Array
  }
}
</script>

<style lang="stylus" scoped>
@import "~@/assets/style/varible.styl"
.item
  padding 0
  line-height .8rem
  .listout
    padding-left .2rem
    border-bottom  1px solid $color-black2
    font-size .28rem
    color $color-black5
    span
      padding-left .05rem
      font-size .28rem
      color $color-blue
    .children
      display block
      padding-left .5rem
.children
  display block
  padding-left .5rem
</style>
